# -*- coding: utf-8 -*-
# @Time    : 2018/9/6 20:27
# @Author  : 聂家利
# @Email   : 1073438012@qq.com
# @File    : .py
# @Software:

# 4-8 6:10 pip install  flask-sqlalchemy
#  pipenv graph

# 0."10:23"

from sqlalchemy import Column, Integer, String

from app.models.base import Base, db


class Book(Base):
    id = Column(Integer, primary_key=True, autoincrement=True)
    title = Column(String(50), nullable=False)
    author = Column(String(30), default='未名')
    binding = Column(String(20))
    publisher = Column(String(50))
    price = Column(String(50))
    pages = Column(Integer)
    pubdate = Column(String(50))
    isbn = Column(String(15), nullable=False, unique=True)
    summary = Column(String(1000))
    image = Column(String(50))

    def sample(self):
        pass